package com.zcyr.constant;

/**
 * 接口状态码(code)字段
 * @author ZCYR
 */
public enum StatusCode {
    // 接口处理成功
    SUCCESS(0, "success"),

    // 接口处理错误
    ERROR(500, "error"),

    // SQL执行错误
    SQL_ERROR(501, "sql error"),

    // 数据库环境错误
    ENV_ERROR(502, "database environment error"),

    // 未登录错误
    NOT_LOGIN(502, "not login"),

    // 需弹窗确认的错误
    FAILURE(600, "failure"),
    ;

    private final int value;
    private final String msg;

    StatusCode(int value, String massage) {
        this.value = value;
        this.msg = massage;
    }

    public int getValue() {
        return value;
    }

    public String getMsg() {
        return msg;
    }
}
